#include <bits/stdc++.h>

using namespace std;

int main(int argc, char const *argv[])
{
	int t;scanf("%d", &t);
	for (int i = 0; i < t; ++i)
	{
		int n,k;scanf("%d%d", &n,&k);
		int fench[n];
		for (int j = 0; j < n; ++j)
		{
			scanf("%d", &fench[j]);
		}
		int mymax=fench[0];
		int mymin=fench[0];
		int yes=1;
		for (int j = 1; j < n; ++j)
		{
			mymax=min(mymax+k-1,fench[j]+k-1);
			mymin=max(mymin-k+1,fench[j]);
			if(mymax<mymin){
				yes=0;
				break;
			}
		}
		if(yes&&mymin==fench[n-1]){
			printf("YES\n");
		}else{
			printf("No\n");
		}
	}
	return 0;
}